home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _EE00AB0B5E2C4A4A916F9389277A4E77 < prev    next >
Encoding:
Text File  |  2004-01-06  |  681 b   |  25 lines

  1. // ===============================================================
  2. // Vertex Program: 
  3. // Description: 
  4. // Last Update: 14/08/2003
  5. // Coder: Andrey Honich
  6. // ===============================================================
  7.  
  8.       #include "../CGVPMacro.csi"
  9.  
  10.  
  11.       MainInput { VIEWPROJ_MATRIX, CAMERA_POS, uniform float4 TCModifiers }
  12.       DeclarationsScript
  13.       {
  14.         IN_T0_N
  15.         OUT_T0_T1
  16.       }
  17.       PositionScript = PosCommon
  18.       CoreScript
  19.       {
  20.         float3 vEyeDir = normalize(CameraPos.xyz - IN.Position.xyz);
  21.         float fDot = dot(vEyeDir.xyz, IN.Normal.xyz);
  22.           
  23.         OUT.Tex0.x = fDot + TCModifiers.x;
  24.       }
  25.